program random_system_functions;

initial begin
    $display("---------------------------------------------------");
    $display("$random(seed):");
    // $random(seed) 平均分布, 返回一个32位有符号整数 
    $display("\t$random(1) function: %0d", $random(1));
    $display("\t$random() function: %0d", $random());
    // $urandom(seed) 平均分布, 返回一个32位无符号整数
    $display("\t$urandom(1) function: %0d", $urandom(1));
    $display("\t$urandom() function: %0d", $urandom());
    // $urandom_range() 指定范围内的平均分布
    $display("\t$urandom_range(0, 100) function: %0d", $urandom_range(0, 100));
    $display("\t$urandom_range(3) function: %0d", $urandom_range(3));
    $display("---------------------------------------------------");
end

endprogram
